#ifndef MCFORM_H
#define MCFORM_H

#include <QWidget>

namespace Ui {
class McForm;
}

class McForm : public QWidget
{
    Q_OBJECT
    
public:
    explicit McForm(QWidget *parent = 0);
    ~McForm();

    void setNumber(const int num);
    inline int getNumber() { return _num; }
    int getItemId() const;
    bool hasInDatabase() const;
    bool insertRecord(const int req_id);
    void setItem(const int details_id);
    bool isChecked() const;

signals:
    void check();
    
private slots:
    void on_item_comboBox_currentIndexChanged(int index);
    void changeAmount(const QString& string);
    void changeMeasure(const QString& string);

    void on_checkBox_toggled(bool checked);

private:
    QString numToBgText(int num);
    void loadData();
    Ui::McForm *ui;
    int _num;
};

#endif // MCFORM_H
